Class symantec.itools.awt.TreeNode
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class symantec.itools.awt.TreeNode

Object
   |
   +----symantec.itools.awt.TreeNode

public class TreeNode
extends Object
implements Serializable
This is a single node in the TreeView panel. It displays text and optionally one of two images depending on its state, collapsed or expanded. It also may have an object associated with it that doesn't get displayed.

See Also:
TreeView

Constructor Index

 o symantec.itools.awt.TreeNode()
Constructs a default TreeNode.
 o symantec.itools.awt.TreeNode(String)
 o symantec.itools.awt.TreeNode(String, Image, Image)
 o symantec.itools.awt.TreeNode(String, TreeView)
Constructs a TreeNode with the given text label.
 o symantec.itools.awt.TreeNode(String, Image, Image, TreeView)
Constructs a TreeNode with the given text label, and collapsed and expanded images.

Method Index

 o collapse()
Sets a flag indicating that this node is not expanded.
 o expand()
Sets a flag indicating that this node is expanded, if it is expandable.
 o getChild()
Gets the child of this node.
 o getDataObject()
Gets the object associated with this node.
 o getDepth()
Gets the depth of this node as previously noted.
 o getImage()
Gets the proper image for this node in its current state, expanded or collapsed.
 o getParent()
Gets the parent of this node.
 o getSibling()
Gets the next sibling of this node.
 o getText()
Gets the current text label for this node.
 o isAChildVisible()
Determines whether any child nodes are visible.
 o isASiblingVisible()
Determines whether any sibling nodes are visible.
 o isExpandable()
Determines whether this node is expandable.
 o isExpanded()
Determines whether this node is expanded.
 o isHidden()
Gets whether this node is hidden.
 o setCollapsedImage(Image)
Sets the image to use for this node when it is not expanded.
 o setDataObject(Object)
Sets an object to associate with this node.
 o setExpandedImage(Image)
Sets the image to use for this node when it is expanded.
 o setHidden(boolean)
Sets whether this node is hidden.
 o setText(String)
Sets a new text label for this node.
 o toggle()
Toggles the node state between collapsed and expanded, if the node is expandable.

Constructors

 o TreeNode
public TreeNode()
Constructs a default TreeNode.

 o TreeNode
public TreeNode(String text)
Note: TreeNode() is deprecated.

See Also:
TreeNode(java.lang.String, symantec.itools.awt.TreeView)
 o TreeNode
public TreeNode(String text,
                Image collapsedImage,
                Image expandedImage)
Note: TreeNode() is deprecated.

See Also:
TreeNode(java.lang.String, java.awt.Image, java.awt.Image, symantec.itools.awt.TreeView)
 o TreeNode
public TreeNode(String text,
                TreeView treeView)
Constructs a TreeNode with the given text label.

Parameters:
text - the text to display for this node
treeView - the instance of TreeView whose node this is. Typically "this"
 o TreeNode
public TreeNode(String text,
                Image collapsedImage,
                Image expandedImage,
                TreeView treeView)
Constructs a TreeNode with the given text label, and collapsed and expanded images.

Parameters:
text - the text to display for this node
collapsedImage - the image to use when this node is collapsed, hiding all of its child nodes
expandedImage - the image to use when this node is expanded, showing all of its child nodes
treeView - the instance of TreeView whose node this is. Typically "this"

Methods

 o collapse
public void collapse()
Sets a flag indicating that this node is not expanded.

 o expand
public void expand()
Sets a flag indicating that this node is expanded, if it is expandable.

 o getChild
public symantec.itools.awt.TreeNode getChild()
Gets the child of this node.

Returns:
this node's child node
See Also:
getParent, getSibling
 o getDataObject
public java.lang.Object getDataObject()
Gets the object associated with this node. This object does not get displayed.

Returns:
the object associated with this node
See Also:
setDataObject
 o getDepth
public int getDepth()
Gets the depth of this node as previously noted.

Returns:
the depth of this node
 o getImage
public java.awt.Image getImage()
Gets the proper image for this node in its current state, expanded or collapsed.

Returns:
the current image for this node in its current state
 o getParent
public symantec.itools.awt.TreeNode getParent()
Gets the parent of this node.

Returns:
this node's parent node
See Also:
getChild, getSibling
 o getSibling
public symantec.itools.awt.TreeNode getSibling()
Gets the next sibling of this node.

Returns:
this node's next sibling node
See Also:
getChild, getParent
 o getText
public java.lang.String getText()
Gets the current text label for this node.

Returns:
the current text label for this node
See Also:
setText
 o isAChildVisible
public boolean isAChildVisible()
Determines whether any child nodes are visible.

Returns:
true if a child node is visible
See Also:
isASiblingVisible
 o isASiblingVisible
public boolean isASiblingVisible()
Determines whether any sibling nodes are visible.

Returns:
true if a sibling node is visible
See Also:
isAChildVisible
 o isExpandable
public boolean isExpandable()
Determines whether this node is expandable. A node is expandable if it has one or more child nodes.

Returns:
true if the node is expandable, false if not
 o isExpanded
public boolean isExpanded()
Determines whether this node is expanded. A node is expanded if its child nodes are visible.

Returns:
true if the node is expanded, false if it is collapsed
 o isHidden
public boolean isHidden()
Gets whether this node is hidden.

Returns:
true if this node is hidden
See Also:
setHidden
 o setCollapsedImage
public void setCollapsedImage(Image image)
Sets the image to use for this node when it is not expanded.

Parameters:
image - the image to use when this node is collapsed
See Also:
setExpandedImage, getImage
 o setDataObject
public void setDataObject(Object theObject)
Sets an object to associate with this node. This object does not get displayed.

Parameters:
theObject - an object to associate with this node
See Also:
getDataObject
 o setExpandedImage
public void setExpandedImage(Image image)
Sets the image to use for this node when it is expanded.

Parameters:
image - the image to use when this node is expanded
See Also:
setCollapsedImage, getImage
 o setHidden
public void setHidden(boolean f)
Sets whether this node is hidden.

Parameters:
f - true to make this node is hidden
See Also:
isHidden
 o setText
public void setText(String s)
Sets a new text label for this node.

Parameters:
s - the new text label for this node
See Also:
getText
 o toggle
public void toggle()
Toggles the node state between collapsed and expanded, if the node is expandable.


All Packages  Class Hierarchy  This Package  Previous  Next  Index